package com.chatplus.application.common.domain.response;

import java.io.Serializable;

/**
 * @description:
 * @author: HHY
 * @create: 2020-07-31 10:15
 **/
@SuppressWarnings("unused")
public class AliyunBotCheckerResponse extends BotCheckerResponse implements Serializable {

    private static final long serialVersionUID = 2789175880308453435L;

    //人机验证结果编码，code 取值：100：表示验证通过,900：表示验证不通过
    private String code;
    //返回结果数据
    private String data;

    public static AliyunBotCheckerResponse ofError() {
        return new AliyunBotCheckerResponse("900", false, "");
    }

    public static AliyunBotCheckerResponse ofPass() {
        return new AliyunBotCheckerResponse("100", true, "");
    }

    public static AliyunBotCheckerResponse ofNotPass() {
        return new AliyunBotCheckerResponse("900", true, "");
    }

    public AliyunBotCheckerResponse() {
        super(false);
    }

    public AliyunBotCheckerResponse(String code, Boolean success, String data) {
        super(success);
        this.code = code;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }
}
